#pragma once

#include <logicwork.h>
#include <vector>
#include <mutex>
#include <thread>

class LogicSystem
{
public:
	static LogicSystem& getInstance();
	void init();
	void stop();
	bool postTask(int index, std::shared_ptr<LogicNode> logicNode);
	~LogicSystem();
private:
	LogicSystem();

private:
	std::mutex workLock_;
	std::vector<std::shared_ptr<LogicWork>> logicWorks_;
};
